<!--"$Id: 2.1.html,v 1.4 2007/05/17 18:17:17 bostic Exp $ (Sleepycat) $Date: 2007/05/17 18:17:17 $"-->
<html>
<head>
<title>The Berkeley DB Package: Interface Changes introduced in DB 2.1.0</title>
<meta name="description" content="DB: A database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods">
</head>
<body bgcolor=white>

<h3 align=center>Interface Changes introduced in DB 2.1.0:</h3>

<ol>
<li>
We have added a compatibility API for DB 1.85.  We had not intended to
do this, however, versions of the GNU gcc compiler in beta release
trigger problems in DB 1.85 (and in previous releases of DB 2.0.N),
causing them to drop core.  As we're unwilling to do further work on
DB 1.85, we're adding in a compatibility mode to the current DB package
instead.
<p>
The DB 1.85 compatibility API is optional (so folks using both DB
1.85 and DB 2.N in a single library aren't surprised).  To include it
in the DB library, use the configuration option --enable-compat185.
For consistency, the configuration option --enable-build185, previously
found in DB 2.N releases, has been renamed to be --enable-dump185.
See the file build.unix/README in the DB distribution for further
information.
<p>
We have also made other changes in the DB 2.1.0 release so that
historic DB 1.85 applications will generally perform better using
the current release than they do using the historic release.
<p>
Please note that the underlying databases MUST still be converted
from the historic format to the current format.
<p><li>
We have changed the default behavior of db_appinit(3) so that it
does NOT create the underlying shared memory regions by default.
If the calling application wants to create these regions, it must
now specify the DB_CREATE flag when calling db_appinit(3).
<p><li>
Specifying transactions to the db_appinit(3) function now implies
logging, that is, DB_INIT_TXN now implies DB_INIT_LOG.
<p><li>
We have changed the memp_stat(3) interface.  It previously took a
pointer to a memory pool (DB_MPOOL *) and a file pointer (FILE *)
and wrote memory pool statistics to the specified file pointer.
The new version is:
<p>
<blockquote>
memp_stat(DB_MPOOL *, DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***);
</blockquote>
<p>
and it returns memory pool statistics to the calling application,
in two new structures.  See the manual page db_mpool(3) in the DB
distribution for more information.  We expect to add similar
statistical functions to the other DB subsystems in future releases.
<p>
There is also a new utility, db_stat(1).  This utility presents the
statistics in human-readable form.
<p><li>
We have added new functionality to the mpool interface.  There's a new
field, mp_mmapsize, in the DB_ENV structure, and a new flag to the
memp_fopen(3) structure (DB_NOMMAP).  These features provide a finer
level of control over which files will be mapped into the process
address space.  See the manual page db_mpool(3) in the DB distribution
for more information.
<p><li>
Page-in and page-out functions specified for buffer pools must now
return an errno value on failure and 0 on success, instead of the
previous interface, which was non-zero on failure and 0 on success,
setting errno.  See the manual page db_mpool(3) in the DB distribution
for more information.
<p><li>
There are a couple of major performance improvements in the new DB
release for small, non-persistent buffer pools, for example,
applications using the traditional DB 1.85 interface or applications
creating small, temporary databases.  First, the shared memory regions
are no longer fully populated on startup.  Second, the backing file used
for temporary buffer pools is no longer created until it is actually
needed.  These changes should cause no visible change for applications.

</ol>
</body>
</html>
